window.onload = function () {
    // var firstNumber = 'I am a String'
    // var secondNumber = 300
    // var thirdNumber = firstNumber + secondNumber
    // alert(thirdNumber)
    // alert(typeof firstNumber)
    // alert(typeof secondNumber)
    // alert(typeof thirdNumber)
    document.querySelector('.btn').onclick = function () {
        var input = document.querySelector('.input').value
        var result = input
        document.querySelector('.result').innerHTML = result
    }

    // 用户名
    const username = document.querySelector('.username')
    document.getElem
    username.onfocus = function () {
        document.querySelector('.username-error').innerHTML = '请输入用户名'
    }
    username.onblur = function () {
        var username = this.value
        if (username.length < 6 || username.length > 12) {
            document.querySelector('.username-error').innerHTML = '用户名长度为6-12位'
        } else {
            document.querySelector('.username-error').innerHTML = ''
        }
        // console.log(username);
    }




}

function click() {
    // alert('I am a function')
    document.querySelector('.result').innerHTML = 'I am a function'
}